#-*-encoding=utf-8-*-
@script_attr(permission='zope.View',use_template='basic')
def setup():
    """安装程序

None"""

    app_container = deployApplet(package, context)
    dingcan_flow = deployDataManager(app_container, 
                                     'dingcan', '定餐单', 'zopen.dinner.dingcan', 
                                     workflow='zopen.dinner.dingcan')

    deployDataManager(app_container, 
                   'user_money', '餐费余额', 'zopen.dinner.user_money')

    deployApplet('default.filerepos', app_container, u'files', u'菜单资料',u'定餐资料')

    IAppletData(app_container).tabpages.append('code:help')

    request.response.redirect( absoluteURL(app_container, request))

@script_attr(permission='zope.View',use_template='basic')
def help():
    """帮助

None"""

    return """<h1>定餐系统使用帮助</h1>
    
    <ol>
    <li>
    必须为每个人设置初始的定餐费余额
    </li>
    
    <li>
    需要设置定餐单，包括定餐管理人、可选餐馆等 
    </li>
    
    <li>
    各个餐馆的菜单资料，可扫描后放入菜单文件夹，方便查看
    </li>
    
    </ol>
    """
    

